ip nat inside source static list
The command creates static NAT entries for LAN hosts. In this case, an access-list is used to define the LAN devices and an IP address pool defines the WAN addresses to be used.
Syntax
ip nat inside source list <acl-name> interface <if-name> ip nat inside source list <acl-name> interface <if-name> pool <pool-name> ip nat inside source list <acl-name> interface <if-name> pool <pool-name> port <wan-port-start> <wan-port-end>
Command |
Description |
---|---|
tcp |
Defines forwarding for a TCP port. |
udp |
Defines forwarding for a UDP port. |
lan-ip |
Defines the IP address of LAN service host. |
same |
Sets the LAN port the same as the WAN port. |
lan-port |
Defines the port number (1-65535) of the LAN service. |
wan-ip |
Defines the WAN interface for this rule. Specify the IP address or 0.0.0.0 for all WAN interfaces. |
wan-port |
Defines the port number on WAN interface. |
range |
Performs port forwarding on a range of ports, rather than a single port. |
acl-name |
Access-list defining the LAN hosts affected by the NAT rule. |
if-name |
WAN interface name and index, to which NAT will be performed. |
pool-name |
IP address pool to be used on the WAN interface. |
Interface Type (ifname) |
Interface ID |
|
---|---|---|
gigabitethernet |
GigabitEthernet interface slot and port (VLAN ID is optional) |
[SLOT/PORT.VLANID] |
cellular |
Cellular interface ID |
0/0 |
gre |
Tunnel GRE ID |
[1-255] |
ipip |
Tunnel IPIP ID |
[1-255] |
l2tp |
L2TP ID |
[0-99] |
pppoe |
PPPoE interface ID |
[1-3] |
pptp |
PPTP ID |
[0-99] |
vlan |
Vlan ID |
[1-3999] |
loopback |
Loopback ID |
[1-5] |
bvi |
Bridge interface |
[1-255] |
Default
No NAT rules are defined.
Command Mode
Privileged User
Example
The following example defines a port forwarding rule:
(config-data)# ip nat inside source list NAT-ACL-NAME interface GigabitEthernet 0/0